const VALUES: [usize; 8] = [1, 2, 5, 10, 20, 30, 50, 100];

pub fn dp_rec_mc(amount: u32) -> u32 {
    let n = amount as usize;
    let mut dp = vec![u32::MAX; n + 1];
    dp[0] = 0;
    for i in 1..=n {
        for &v in &VALUES {
            if i >= v {
                dp[i] = dp[i].min(dp[i - v] + 1);
            }
        }
    }
    dp[n]
}
